﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.Hosting;

namespace Noria.Web.Utility
{
    public class RazorRequest : SimpleWorkerRequest
    {
        private TextWriter _output;

        public RazorRequest(string page, string query, TextWriter output)
            : base(page, query, output)
        {
            _output = output;
        }

        public override void SendResponseFromMemory(byte[] data, int length)
        {
            _output.Write(Encoding.UTF8.GetChars(data, 0, length));
        }
    }

}
